
// ***********************************************************************
// AUTO GENERATED CLASS - Do Not Modify this file, if needed modify .tt
// ***********************************************************************
// Assembly         : InnovaApp_DomainLayer
// Author           : LJO+01
// Created          : 17/11/2013 20:29:50
// ***********************************************************************
// <copyright file="N.A." company="Copyright © Innovacall 2011">
//     Copyright (c) . All rights reserved.
// </copyright>
// <summary>
// Domain layer  
// DomainClass
// </summary>
// ***********************************************************************

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;


namespace InnovaApp.Layers.DomainLayer
{
    /// <summary>
    /// Class InnoAppSpecialBlockHTMLContent
    /// </summary>
    [Serializable]
    public partial class InnoAppSpecialBlockHTMLContent : _DomainLayer_Base  
    {
        #region Primitive Properties
    	
        /// <summary>
        /// Gets or sets Id.
        /// </summary>
        /// <value>The Id.</value>
        public virtual int Id
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets FK_InnoApplication.
        /// </summary>
        /// <value>The FK_InnoApplication.</value>
        /// <remarks>
        /// Foregn key of InnoAppSpecialBlockHTMLContent
        /// 
        /// </remarks>
        public virtual System.Guid FK_InnoApplication
        {
            get { return _fK_InnoApplication; }
            set
            {
                if (_fK_InnoApplication != value)
                {
                    if (InnoApplication != null && InnoApplication.Id != value)
                    {
                        InnoApplication = null;
                    }
                    _fK_InnoApplication = value;
                }
            }
        }
        private System.Guid _fK_InnoApplication;
    	
        /// <summary>
        /// Gets or sets FK_Language.
        /// </summary>
        /// <value>The FK_Language.</value>
        /// <remarks>
        /// Foregn key of InnoAppSpecialBlockHTMLContent
        /// 
        /// </remarks>
        public virtual int FK_Language
        {
            get { return _fK_Language; }
            set
            {
                if (_fK_Language != value)
                {
                    if (Language != null && Language.Id != value)
                    {
                        Language = null;
                    }
                    _fK_Language = value;
                }
            }
        }
        private int _fK_Language;
    	
        /// <summary>
        /// Gets or sets SameForAllLanguages.
        /// </summary>
        /// <value>The SameForAllLanguages.</value>
        public virtual bool SameForAllLanguages
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets SiteLayout.
        /// </summary>
        /// <value>The SiteLayout.</value>
        public virtual string SiteLayout
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets BlockSelector.
        /// </summary>
        /// <value>The BlockSelector.</value>
        public virtual string BlockSelector
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets HTMLContent.
        /// </summary>
        /// <value>The HTMLContent.</value>
        public virtual string HTMLContent
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets DocReadyEntries.
        /// </summary>
        /// <value>The DocReadyEntries.</value>
        public virtual string DocReadyEntries
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets ScriptLinks.
        /// </summary>
        /// <value>The ScriptLinks.</value>
        public virtual string ScriptLinks
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets CssLinks.
        /// </summary>
        /// <value>The CssLinks.</value>
        public virtual string CssLinks
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets MediaSourceJSonList.
        /// </summary>
        /// <value>The MediaSourceJSonList.</value>
        public virtual string MediaSourceJSonList
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets ClassName.
        /// </summary>
        /// <value>The ClassName.</value>
        public virtual string ClassName
        {
            get;
            set;
        }
    	
        /// <summary>
        /// Gets or sets rowversion.
        /// </summary>
        /// <value>The rowversion.</value>
        public virtual byte[] rowversion
        {
            get;
            set;
        }

        #endregion

        #region Navigation Properties
        public virtual InnoApplication InnoApplication
        {
            get { return _innoApplication; }
            set
            {
                if (!ReferenceEquals(_innoApplication, value))
                {
                    var previousValue = _innoApplication;
                    _innoApplication = value;
                    FixupInnoApplication(previousValue);
                }
            }
        }
        private InnoApplication _innoApplication;
        public virtual Language Language
        {
            get { return _language; }
            set
            {
                if (!ReferenceEquals(_language, value))
                {
                    var previousValue = _language;
                    _language = value;
                    FixupLanguage(previousValue);
                }
            }
        }
        private Language _language;

        #endregion

        #region Association Fixup
    
        private void FixupInnoApplication(InnoApplication previousValue)
        {
            if (previousValue != null && previousValue.InnoAppSpecialBlockHTMLContent.Contains(this))
            {
                previousValue.InnoAppSpecialBlockHTMLContent.Remove(this);
            }
    
            if (InnoApplication != null)
            {
                if (!InnoApplication.InnoAppSpecialBlockHTMLContent.Contains(this))
                {
                    InnoApplication.InnoAppSpecialBlockHTMLContent.Add(this);
                }
                if (FK_InnoApplication != InnoApplication.Id)
                {
                    FK_InnoApplication = InnoApplication.Id;
                }
            }
        }
    
        private void FixupLanguage(Language previousValue)
        {
            if (previousValue != null && previousValue.InnoAppSpecialBlockHTMLContent.Contains(this))
            {
                previousValue.InnoAppSpecialBlockHTMLContent.Remove(this);
            }
    
            if (Language != null)
            {
                if (!Language.InnoAppSpecialBlockHTMLContent.Contains(this))
                {
                    Language.InnoAppSpecialBlockHTMLContent.Add(this);
                }
                if (FK_Language != Language.Id)
                {
                    FK_Language = Language.Id;
                }
            }
        }

        #endregion

    }
}
